﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Imaginecup.observer;
using imaginecup.information;
using imaginecup.objectManager;
using Imaginecup.component.scene;

namespace Imaginecup.gameState.malaria.component.scene
{
    public class BaseScene:BaseSubjectEntity
    {        
        private bool m_Selected;
        private SceneData m_SceneData;

        public BaseScene(GObjectID a_GID, ObjectManager objMan , SComponentTypeID typeID )
            : base(a_GID, objMan, typeID )
        {            
           m_Selected = false;
        }

        public virtual void SetSceneData(Object data)
        {
            m_SceneData = (SceneData)data;
        }

        public virtual Object GetSceneData()
        {
            return m_SceneData;
        }

        public virtual void SetSelectedScene()
        {
            m_Selected = true;

            //옵저버에게 변경되었다고 알린다.
            NotifyAll( null );
        }

        public virtual bool IsSelectedScene()
        {
            return m_Selected;
        }


        //다른곳에서 클릭이 되었다는 뜻이다.
        public virtual void Notify(Object data)
        {
            m_Selected = false;
        }

         public override void Release()
        {
             base.Release();
        }

    }
}
